
***************************************************
* Figure D.1
***************************************************


use "$workdat_abj/combine/edulevels", clear
g e2=e
g e3=1


g edul2=edul
replace edul2=0 if edul==.
replace edul2=5 if edul==10 & eduf!=10

collapse sa wage (sum) e2 e3 [fw=e] if edul!=., by(pnr age_q edul2)
collapse sa wage [aw=e3] if age_q>=21 & age_q<29, by(age_q edul2)

capture drop sa2 wage2
g sa2=.
g wage2=.
forvalues i= 0(5)40 {
sum sa if edul2==`i'
replace sa2=sa-r(mean) if edul2==`i'
sum wage if edul2==`i'
replace wage2=wage-r(mean) if edul2==`i'
}



twoway (scatter sa age_q if edul2==10, msymbol(o) mlcolor(gs1) mfcolor(gs16) yaxis(1)) ///
	   (line sa age_q if edul2==25,  lcolor(gs1) lwidth(medium) lpattern(dash)  yaxis(2)) ///
	   (line sa age_q if edul2==35,  lcolor(gs1) lwidth(medium) lpattern(solid) yaxis(2)) ///
	   , ylabel(0.08(0.02)0.18, axis(1)) ytitle("Social Assistance", height(5)) ytitle("", axis(2)) ylabel(0.0(0.02)0.1, axis(2))  xlabel(21(1)29) ///
	   scheme(s1mono) name(figD1, replace) xline(24.958333, lwidth(thin)) xtitle("Age in months", height(5))  ///
	   legend(region(lwidth(none)) order( 1 "Basic Schooling (l.axis)"  2 "High School (vocational) (r.axis)" 3 "Vocational Degree (r.axis)") symxsize(5)  )

graph save figD1  $figures/figD1, replace
graph export $figures/figD1.pdf, name(figD1) replace
graph export $figures/figD1.png, name(figD1) replace


***************************************************
* end: Figure D.1
***************************************************

